Faceted search with relationships between categories

ABSTRACT

Method, system, and computer program product for faceted search with relationships between categories are provided. The method includes: having a document set of multiple documents, each document having associated categories to which it belongs; grouping multiple categories associated with a document into a category set based on a relationship between the multiple categories; associating the category set with the document; and indexing the category set for retrieval of documents from categories sharing a category set. Wherein indexing the category set includes: having an index entry of a textual representations of a category, wherein the index entry includes a single occurrence for each document to which the category is attached; adding a payload to a document occurrence of a serialization of an identifier of the category sets to which the category belongs associated with the document. Indexing the category set further includes: adding an index entry for category set data, wherein the index entry includes a single occurrence for each document, wherein a document occurrence includes a payload of a serialization of an identifier of category sets associated with the document, and an identifier of the categories belonging to the category sets.

BACKGROUND

This invention relates to the field of faceted search. In particular, the invention relates to faceted search with relationships between categories.

A category is an aspect of indexed documents which can be used to classify the documents. For example, in a collection of books at an online bookstore, categories of a book can be its price, author, publication date, binding type, and so on.

In faceted search, in addition to the standard set of search results, facet results are also provided, which are lists of subcategories for certain categories. For example, for the price facet, a list of relevant price ranges is provided; for the author facet, a list of relevant authors is provided; and so on. In most user interfaces, when users click one of these subcategories, the search is narrowed, or drilled down, and a new search limited to this subcategory (e.g., to a specific price range or author) is performed.

One of the weaknesses of current faceted search systems is an inability to capture more complex data. For example, if different books in a bookstore have different bindings and prices, currently, modeling the store inventory in faceted search will result in different facets about every binding and price. However, not all books are available in all bindings and prices, and there is no way to capture complex facts such as “There are 10 copies from book X in paperback and price Y”. When a buyer wants to buy a copy of book X, the faceted navigation would offer facets about all available bindings and prices for that book. However, when selecting a certain binding, the price facet would not reflect the prices available for all bindings, rather the prices available for the binding selected. This does not provide the user with the requested information.

BRIEF SUMMARY

According to a first aspect of the present invention there is provided a computer-implemented method for faceted search with relationships between categories performed by a computerized device, comprising: having a document set of multiple documents, each document having associated categories to which it belongs; grouping multiple categories associated with a document into a category set based on a relationship between the multiple categories; associating the category set with the document; and indexing the category set for retrieval of documents from categories sharing a category set.

According to a second aspect of the present invention there is provided a computer program product for faceted search with relationships between categories, the computer program product comprising: a computer readable non-transitory storage medium having computer readable program code embodied therewith, the computer readable program code comprising: computer readable program code configured to: have a document set of multiple documents, each document having associated categories to which it belongs; group multiple categories associated with a document into a category set based on a relationship between the multiple categories; associate the category set with the document; and index the category set for retrieval of documents from categories sharing a category set.

According to a third aspect of the present invention there is provided a system for faceted search with relationships between categories, comprising: a processor; an index of a document set of multiple documents; an indexing system including: a category associating component for associating categories to a document to which it belongs; a category set component for grouping multiple categories associated with a document into a category set based on a relationship between the multiple categories; a category set associating component for associating the category set with the document; and an indexing component for indexing the category set for retrieval of documents from categories sharing a category set.

According to a fourth aspect of the present invention there is provided a method of providing a service to a customer over a network, the service comprising: having a document set of multiple documents, each document having associated categories to which it belongs; grouping multiple categories associated with a document into a category set based on a relationship between the multiple categories; associating the category set with the document; and indexing the category set for retrieval of documents from categories sharing a category set.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The subject matter regarded as the invention is particularly pointed out and distinctly claimed in the concluding portion of the specification. The invention, both as to organization and method of operation, together with objects, features, and advantages thereof, may best be understood by reference to the following detailed description when read with the accompanying drawings in which:

FIG. 1 is a flow diagram of a method in accordance with the present invention;

FIG. 2 is a flow diagram of an aspect of a method in accordance with the present invention;

FIG. 3 is a flow diagram of an aspect of a method in accordance with the present invention;

FIG. 4 is a block diagram of a system in accordance with the present invention;

FIG. 5 is a block diagram of a computer system in which the present invention may be implemented;

FIGS. 6A and 6B are schematic diagrams showing example category sets in accordance with the present invention;

FIGS. 7A and 7B are schematic diagrams showing indexing categories for faceted search and faceted search implementation as known in the prior art; and

FIGS. 8A and 8B are schematic diagrams showing indexing category sets and search with category sets in accordance with the present invention.

It will be appreciated that for simplicity and clarity of illustration, elements shown in the figures have not necessarily been drawn to scale. For example, the dimensions of some of the elements may be exaggerated relative to other elements for clarity. Further, where considered appropriate, reference numbers may be repeated among the figures to indicate corresponding or analogous features.

DETAILED DESCRIPTION

In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the invention. However, it will be understood by those skilled in the art that the present invention may be practiced without these specific details. In other instances, well-known methods, procedures, and components have not been described in detail so as not to obscure the present invention.

The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of all means or step plus function elements in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

Method, system and computer program product are described which provide an ability to tie categories attached to a certain document together as a set of related categories. This enables facet counting which applies limitations using these relations. Furthermore, efficient ways to index and retrieve the category sets information are described.

The described solution groups different related categories/facets associated with a document into a category set and associates the category set with the document. The solution also includes indexing the category sets and retrieving documents matching the category set. Multiple simple categories are grouped into a category set and then results provided corresponding to the category set. The term category is used and is intended to include facets, groups, or other forms of related documents.

The following contains a description of a simple implementation of faceted search for background purposes, and the proposed extensions to allow efficient faceted search based on category sets. As the proposed extensions affect only the selection of categories aggregated for each document, other faceted search features should not be affected.

Background: Current Faceted Search Implementation

Let D be a collection of documents d₁. . . d_(N), where document d_(i) contains words w_(i,1). . . w_(i,ni). An inverted index of D generally includes two components:

1. Lexicon: a list of all the words w appearing in D, ordered lexicographically; 2. Posting lists: for each word w, a list of occurrence of w in D. Each entry in the list may be a tuple (i, p, b), where i is the document number, p is the position of the word within the document, and b is a byte array which may contain additional data regarding the occurrence.

A single word search query q(w) may be performed using an inverted index by locating w in the lexicon, and then iterating through its posting list, counting for each document the number of occurrences and ranking the documents by the number of occurrences. A search query for an AND of two words q(AND(w₁,w₂)) may be done by finding w₁, w₂ in the lexicon, and then going through their posting lists and finding documents in which both words appear, ranking these documents by the sum of occurrences of the two words in the documents. More sophisticated queries and scoring may be applied using similar approach.

A taxonomy of categories T may contains nodes t₀. . . t_(m), where t₀ is the root of the taxonomy, and each node t_(i) except for the root (i≧1) contains a string s(t_(i)) and has a single direct parent p(t_(i)). The ordinal of node t_(i) is i.

Category c_(i) may be defined as (t_(a) ₁ , t_(a) ₂ , . . . , t_(a) _(k) ) where:

t_(a) _(k) =t_(i)

t _(a) _(j) =p(t _(a) _(j+1) ) for 1≦j≦k and

p(t _(a) ₁ )=t ₀

which is the ordered list of nodes from the root (not including) to t_(i). The ordinal of c_(i) is i.

Category C_(a) is an ancestor of category c_(b) (c_(a)=A(c_(b))), if c_(a) is a non-empty prefix of c_(b). The descendants of c_(a), Desc(c_(a)) is the group of categories c_(d) such that c_(a) is a prefix of c_(d).

A collection of documents D=d₁. . . d_(n) may be categorized by attaching to each document d_(i) multiple categories C_(i)=C_(i) ₁ . . . c_(i) _(p) . Adding these categories to an inverted index of D may be done as follows.

1. Each category c_(i) may be assigned a unique textual representation w(c_(i)) (unique both between categories and in relation to other words in the lexicon). w(c_(i)) may be added to the lexicon, and its posting list contains a single occurrence in position 0 for each document to which c_(i) is attached to. 2. A unique word w(T) may be added to the lexicon representing a taxonomy of categories. The posting list of w(T) may contain a single occurrence for each document that has categories. The occurrence related to document d_(i) may be located in position 0, and its byte array may contain a serialization of the ordinals of the categories in C_(i).

Let R(q,D) be all documents complying with query q on the collection D. The category count of category c in relation to q (CC(c, q, D)) is the number of documents in R(q,D) to which c is attached. Obtaining all category counts for q may be achieved by going through the posting list of w(T), locating the occurrences in documents from R(q), and de-serializing the byte array of the occurrence. Now, for each category c_(k) in the de-serialized list, the count of c_(k) is increased by 1.

Let c be a category in T, and let s be a boolean function such that s(c) selects a sub group of Desc(c). Given a collection D and a query q, let C′(D, q, c, s) be the list of categories c¹. . . c^(K) such that:

CC(c^(i), q, D)>0) for 1≦i≦K,

c^(i)∈s(c) for 1≦i≦K,

CC(c^(i), q, D)≧CC(c¹⁺¹, q, D) for 1≦i≦K−1.

A facet may be defined Facet(D, q, c, s, k) to be the first k elements in C′(D, q, c, s).

Given a query q and a category c_(q), the Drill Down Query of q and c_(q)(DD(q, c_(q))), is a query which limits the results of q to contain only the results to which c is attached. It may be applied by going through the documents in R(q), keeping only documents which occur in the posting list of w(c). Facet calculation for drill down queries may be done the same as for any query.

A drill down query may be generalized from a single category to multiple categories by replacing c_(q) with a group of categories C_(q). In that case, only documents in R(q) to which all categories in C_(q) are attached will be in DD(q, C_(q)).

Enhancing Faceted Search with Category Sets

A category set S_(i) ^(j) is defined for document d_(i) as a grouping of categories c¹. . . c^(k) such that c¹ ∈C_(i) for 1≦1≦k. The category sets data may be added in two different ways to the index:

1. Let S_(i) ^(j1). . . S_(i) ^(jp) be the category sets of document d_(i) to which category c^(i) belongs. As previously defined, the posting list of w(c^(i)) may include a single occurrence in document d_(i), at position 0. The byte array of this occurrence may now contain a serialization of j₁. . . j_(p). 2. A unique word CS(T) may be added to the lexicon representing category set listings. The posting list of CS may contain a single occurrence for each document that has category sets with categories from taxonomy T. Assuming d_(i) has m category sets, the occurrence related to document d_(i) may be located in position 0, and its byte array may contain a serialization of the category sets S_(i) ¹. . . s_(i) ^(m). This serialization allows, given a category set S_(i) ^(j), to efficiently retrieve the ordinals of all categories in S_(i) ^(j).

As defined above, given a query q and a category c_(q), R(DD(q, c_(q))) is the set of documents complying with the drill down query of q and c_(q). The Category Count with Same Set Constraint of c in relation to q and c_(q) (CC_(SSC)(c, q, cq, D)), is the number of documents in R(DD(q, c_(q))) to which c is attached, such that c and c_(q) share at least one category set.

An efficient calculation of CC_(SSC) for all categories given certain q and c_(q) may be done by going through the posting list of c_(q). For each document d_(i) in that posting list which is in R(DD(q, c_(q))), the byte array of the category sets to which c_(q) belongs may be extracted and de-serialized. For each set S_(i) ^(j) in the list, the ordinals of all categories in S_(i) ^(j) may be fetched, and the ordinals from all the lists may be merged to produce the list of categories which comply with the same set constraint in document d_(i). For each such category c_(k) the category count may be increased by 1.

Let c be a category in T, and let s be a boolean function such that s(c) selects a sub group of Desc(c). Given a collection D, a query q and a category c_(q), let C′_(SSC)(D, q, c, cq, s) be the list of categories c¹. . . c^(K) such that:

CC _(SSC)(c ^(i) , q, c _(q) , D)>0) for 1≦i≦K,

c ^(i) ∈s(c) for 1≦i≦K,

CC _(SSC)(c ^(i) , q, c _(q) , D)≧CC _(SSC)(c ^(i+1) , q, c _(q) , D) for 1≦i≦K−1,

A same set constrained facet may be defined Facet_(SSC)(D, q, c, c_(q), s, k) to be the first k elements in C′_(SSC)(D, q, c, c_(q), s).

The same set constraint may be generalized from a single category constraint to multiple category constraint by replacing c_(q) with a group of categories C_(q). Given the generalization drill down query given above, CC_(SSC)(c, q, C_(q), D)) is the number of documents in R(DD(q, C_(q))) to which c is attached, such that c and all categories from C_(q) share at least one category set.

Referring to FIG. 1, a flow diagram 100 shows an embodiment of the described method. The method starts with having 101 a document set of multiple documents in which each document may have associated categories to which it belongs and a reference to which may be attached to the document. The method groups 102 multiple categories associated with a document into a category set which may be based on a relationship between the multiple categories. The category set is associated 103 with the document and indexed 104 for retrieval of documents from categories sharing a category set.

FIG. 2 is a flow diagram 200 showing an example embodiment of a method of indexing the described category sets. Category sets are defined 201 and each defined category set may be assigned 202 an identifier, such as an ordinal number (for example, in ascending order).

Each category may have an existing index entry 203 (for example, in a lexicon) with a unique textual representation of the category and a posting list with an occurrence for each document belonging to the category. A payload may be added 204 to the document occurrence of a category index entry of each category from a category set, with the payload including the set's identifier. If the category belongs to more than one set, the payload may include the identifiers of all the sets the category belongs to.

An index entry may be provided 205 for a category sets list with a posting list with an occurrence for each document that has category sets. A payload may be added 206 to the document occurrence including a serialization of all the category sets data which may include which categories are included of the different category sets identified by their identifiers.

FIG. 3 is a flow diagram 300 showing an example embodiment of a method of searching using the described category sets.

A search query may be received 301 including a query term, a facet request and a set constraint. For example, the set constraint may be a “same set constraint”.

The documents which comply with the query may be obtained 302 (the “result set”). For each document in the result set, it may be determined 303 if terms matching the categories from the same set constraint occur in the document. If they do, the list of identifiers of sets to which each category from the set constraint belongs may be obtained 304.

The payload of the index entry for category set data is obtained 305 and deserialized to obtain identifiers of all the categories in the identified sets.

All categories that match the facet request may be counted 306. For example, in the same set constraint, each category in the sets is counted that is: a) not in the set constraint, and b) matches the facet request.

Another example of a set constraint is “one-of-any same set constraint”, where the constraint contains a list of categories, and the relevant category sets given a document are the sets which contain at least one category from the set constraint.

A further possible set constraint is “second degree same set constraint”. Evaluating this constraint type has two phases. The first phase is identical to the “same set constraint” —identifying all categories which share category sets with the set constraint categories. In the second phase, the categories found in the first phase are used as input, and any category which co-occurs in a category set with those categories is counted (in accordance to the facet request).

Referring to FIG. 4, a block diagram shows an embodiment of a system 400 for faceted search with related categories defined in category sets.

The system 400 may include an indexing system 401 for indexing a document set of multiple documents in an index 420. The indexing system 401 may include a category associating component 402 for associating categories to a document to which it belongs. The indexing system 401 may also include a category set component 403 for grouping multiple categories associated with a document into a category set based on a relationship between the multiple categories. A category set associating component 404 may be provided for associating the category set with a document. An indexing component 405 may be provided for indexing the category sets in the index 420 for retrieval of documents from categories sharing a category set.

A faceted search system 410 may be provided including an input mechanism 411. The input mechanism 411 may include a query input component 412 for inputting a query term, a category input component 413 for inputting a category or facet request, and a category set constraint component 414 for inputting a set constraint, for example, a same set constraint, one-of-any same set constraint, second degree same set constraint, or any other defined set constraint.

The faceted search system 410 may include a results mechanism 415. The results mechanism 415 may include a query results component 416 for returning results for an input query term. The results mechanism 415 may include a category set constraint results component 418 for applying an input set constraint and including a category set data retriever 406 for retrieving category set data from set lists in an index 420. The results mechanism 415 may also include a category results component 417 for restricting the results to a requested category for a facet request. The results mechanism 415 may include a document count component 419.

The system 400 may also include an index 420 for indexing documents 421 by terms 422, the documents 421 belonging to categories 423 which may be grouped in category sets 424. The index may include a lexicon 430 with posting lists 431 for terms 432, category terms 433. Posting lists 431 may also be provided for a taxonomy of categories 434 and for a category set lists 435.

Referring to FIG. 5, an exemplary system for implementing aspects of the invention includes a data processing system 500 suitable for storing and/or executing program code including at least one processor 501 coupled directly or indirectly to memory elements through a bus system 503. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.

The memory elements may include system memory 502 in the form of read only memory (ROM) 504 and random access memory (RAM) 505. A basic input/output system (BIOS) 506 may be stored in ROM 504. System software 507 may be stored in RAM 505 including operating system software 508. Software applications 510 may also be stored in RAM 505.

The system 500 may also include a primary storage means 511 such as a magnetic hard disk drive and secondary storage means 512 such as a magnetic disc drive and an optical disc drive. The drives and their associated computer-readable media provide non-volatile storage of computer-executable instructions, data structures, program modules and other data for the system 500. Software applications may be stored on the primary and secondary storage means 511, 512 as well as the system memory 502.

The computing system 500 may operate in a networked environment using logical connections to one or more remote computers via a network adapter 516.

Input/output devices 513 can be coupled to the system either directly or through intervening I/O controllers. A user may enter commands and information into the system 500 through input devices such as a keyboard, pointing device, or other input devices (for example, microphone, joy stick, game pad, satellite dish, scanner, or the like). Output devices may include speakers, printers, etc. A display device 514 is also connected to system bus 503 via an interface, such as video adapter 515.

An example is now provided to illustrate further the described method and system.

Referring to FIGS. 6A and 6B, schematic diagrams show documents having categories and category sets. In FIGS. 6A, example documents 610, 620, 630, 640 are attached with categories. Example 1 document 610 has categories of Person X 611 and Tag T 612. Example 2 document 620 has a category of Person X (author, tagger) 621. Example 3 document 630 has a category of Tag T (10) 631. Combined example document 640 has categories of Person X (author, tagger) 641, Person Y (tagger) 642, Person Z (tagger) 643, and Tag T (10) 644.

In FIG. 6A, part of the relationship is not modeled, namely the fact that Person X used Tag T. In order to maintain this part of the relationship, a new construct is introduced, which binds categories together as category sets. A category set is a grouping of categories attached to a certain document.

In FIG. 6B, the combined example document 640 is shown as having two category sets 651, 652. A first category set 651, “Set 1”, includes Person X (author, tagger) 641 and Tag T (10) 644. A second category set 652, “Set 2”, includes Person Z (tagger) 643 and Tag T (10) 644.

FIGS. 7A and 7B are schematic diagrams showing examples of indexing categories for faceted search and a faceted search implementation as known in the prior art.

Referring to FIG. 7A, the combined example document 640 of FIGS. 6A and 6B is used.

Index entries 711-714 are provided for category terms 710. The index entries 711-714 are posting lists which have a single occurrence 721, 722 for each document to which the category is attached. This allows the limiting of documents in a result set to only those which are attached with a certain category.

In basic facets aggregation, when dealing with a specific document each category is either attached to the document or not. This means that during indexing it is enough to serialize all categories attached to a certain document, and add them as the payload of a designated term (to be denoted “fulltree term”). The fulltree term index entry 730 is a posting list of categories in a taxonomy. The fulltree term index entry 730 includes document occurrences 731-733 with each document occurrence having a payload of serialized categories to which the document belongs. For example, in the case of the combined example document 640, the document occurrence 732 includes a payload of serialized categories of Person X, Person Y, Person Z, and Tag T (XYZT).

Referring to FIG. 7B, the indexed categories are used in a faceted search request. The faceted search request contains two parts: the query which dictates which documents are relevant; and the facet request which dictates which categories are to be counted.

To count to how many documents from the result set (documents which comply with the query) each category is attached to, it is sufficient to go through the posting list of the fulltree term index entry 730, and find the document occurrences 731-733 corresponding to the result set. For each such document occurrence 731-733, the payload is fetched and deserialized to get the document categories. The count of each of these categories which is relevant to the facet request is then incremented, and at the end of the process all categories that match the facet request are associated with the proper count.

In the example shown in FIG. 7B, the facet request is for tags. Therefore, the aggregated categories 740 are counted from the fulltree term index entry 730. The document occurrence 731 has categories Person X and Person Y; therefore no count is added 741. The document occurrence 732 has categories Person X, Person Y, Person Z, and Tag T; therefore a count of T(1) 742 is added. The document occurrence 733 has categories of Person Y and Tag T; therefore the count is incremented to T(2) 743.

FIGS. 8A and 8B are schematic diagrams showing an example of indexing category sets for faceted search and an example faceted search implementation using category sets as described herein. The examples given in FIGS. 6A, 6B, 7A and 7B are used.

The notion of category sets allows a method for attaching categories to documents, where a set of categories may be attached to a certain document together. This requires, in addition to the fulltree term, a new designated term as an index entry for category sets data 810 (denoted “sets list term”).

For a document that is attached with category sets, all categories in the sets may be added in the regular manner, and in addition the following may occur. Each category set may be assigned an ordinal number (in ascending order), or other form of reference. A payload may be added to the category term index entry 711-714 of each category from the set. The payload of each document occurrence 721, 722 may have the category set's ordinal number added to it. If the category belongs to more than one set the payload may include the ordinal numbers of all the sets the category belongs to.

For example, the combined example document 640 has document occurrences 821-824 in each of the category term index entries 711-714 for Person X 711, Person Y 712, Person Z 713, and Tag T 714. The categories of Person X and Tag T belong to Set 1 651 and therefore the ordinal number “1” is added to the document occurrences 821 and 824 for the document in category term index entries 711 and 714 for categories Person X and Tag T respectively. The categories of Person Y and Tag T belong to Set 2 652 and therefore the ordinal number “2” is added to the document occurrences 822 and 824 for the document in category term index entries 712 and 714 for categories Person Y and Tag T respectively.

The index entry for category sets data 810 has a document occurrence 811 for the combined example document 640 and the payload includes a serialization of all the category sets data. In this example, “1:XT” denoting Set 1 651 with categories Person X and Tag T, and “2:YT” denoting Set 2 652 with categories Person Y and Tag T.

Referring to FIG. 8B, with the addition of category sets, a faceted search request may contain a set constraint in addition to the query and facet request. The set constraint may define which sets are relevant. One example for such a constraint is “same set constraint”, which is defined by a list of categories that must be contained in the category set. For each set that complies with the constraint, all categories which are not in the list are relevant to the facet request. This captures categories related to the facet request category.

Applying a same set constrained facet request may involve the following steps. Firstly, the documents which comply with the query (the “result set”) may be found. For each document in the result set, it may be determined if the terms matching the categories from the same set constraint occur in the document by looking up the document occurrences in the category term index entries 711-714. If they do, the list of ordinals of sets to which each category from the set constraint belongs may be fetched, and the ordinals lists may be intersected. If the intersection is not empty, the payload of the document occurrence of the sets list term 810 in the document may be fetched and deserialized. For each category set in the intersection, the set categories may be obtained. For each category in these sets that is a) not in the set constraint, and b) matches the facet request, the count may be incremented.

At the end of the process all categories that match the facet request and set constraint may be associated with the proper count.

Referring to the example of the combined example document 640, the same set constraint as category Person X is used. The document occurrences 721, 722 in the category term index entry 711 for Person X are retrieved. The document occurrence 722 includes Set 1. From the set list term 810 document occurencce payload, it is determined that Set 1 includes the categories of Person X and Tag T. As Tag T is not in the set constraint and matches the facet request of counting tags, the category of Tag T is aggregated by count T(1) 840.

A system for faceted search with related categories may be provided as a service to a customer over a network.

As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).

Aspects of the present invention are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.

The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.

The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. 

1. A computer-implemented method for faceted search with relationships between categories performed by a computerized device, comprising: having a document set of multiple documents, each document having associated categories to which it belongs; grouping multiple categories associated with a document into a category set based on a relationship between the multiple categories; associating the category set with the document; and indexing the category set for retrieval of documents from categories sharing a category set.
 2. The method as claimed in claim 1, wherein indexing the category set includes: having an index entry of a textual representations of a category, wherein the index entry includes a single occurrence for each document to which the category is attached; adding a payload to a document occurrence of a serialization of an identifier of the category sets to which the category belongs associated with the document.
 3. The method as claimed in claim 1, wherein indexing the category set includes: adding an index entry for category set data, wherein the index entry includes a single occurrence for each document, wherein a document occurrence includes a payload of a serialization of an identifier of category sets associated with the document, and an identifier of the categories belonging to the category sets.
 4. The method as claimed in claim 2, wherein the index entry of a textual representation of a category is a posting list in a lexicon for a set of documents.
 5. The method as claimed in claim 3, wherein the index entry for category set data is a posting list in a lexicon for a set of documents.
 6. The method as claimed in claim 1, wherein associating a category set with a document includes assigning an identifier of the category set.
 7. The method as claimed in claim 1, including: receiving a query request including a query term, a facet request and a category set constraint; obtaining a result set of documents for the query term; for each document in the result set, determining if terms matching the categories from the set constraint occur in the document and, if so, obtaining identifiers of the sets to which each category belongs; obtaining the payload of the index entry for category set data to obtain identifiers of the categories in the identified sets; and counting all categories that match the facet request.
 8. The method as claimed in claim 7, wherein a category set constraint is one of the group of: a same set constraint where the constraint contains a list of categories, and the relevant category sets given a document are the sets which contain all categories from the set constraint; or a one-of-any same set constraint where the constraint contains a list of categories, and the relevant category sets given a document are the sets which contain at least one category from the set constraint; or a second degree same set constraint, where all categories are identified which share category sets with the set constraint categories, the identified categories are used as input, and any category which co-occurs in a category set with those categories is counted.
 9. The method as claimed in claim 1, including generalizing a category set constraint to a multiple category constraint.
 10. A computer program product for faceted search with relationships between categories, the computer program product comprising: a computer readable non-transitory storage medium having computer readable program code embodied therewith, the computer readable program code comprising: computer readable program code configured to: have a document set of multiple documents, each document having associated categories to which it belongs; group multiple categories associated with a document into a category set based on a relationship between the multiple categories; associate the category set with the document; and index the category set for retrieval of documents from categories sharing a category set.
 11. A system for faceted search with relationships between categories, comprising: a processor; an index of a document set of multiple documents; an indexing system including: a category associating component for associating categories to a document to which it belongs; a category set component for grouping multiple categories associated with a document into a category set based on a relationship between the multiple categories; a category set associating component for associating the category set with the document; and an indexing component for indexing the category set for retrieval of documents from categories sharing a category set.
 12. The system as claimed in claim 11, wherein the indexing component includes: a category entry component for entering an index entry of a textual representations of a category, wherein the index entry includes a single occurrence for each document to which the category is attached and for adding a payload to a document occurrence of a serialization of an identifier of the category sets to which the category belongs associated with the document.
 13. The system as claimed in claim 11, wherein the indexing component includes: a category set data component for adding an index entry for category set data, wherein the index entry includes a single occurrence for each document, wherein a document occurrence includes a payload of a serialization of an identifier of category sets associated with the document, and an identifier of the categories belonging to the category sets.
 14. The system as claimed in claim 11, wherein the category set associating component for associating a category set with a document includes assigning an identifier of the category set.
 15. The system as claimed in claim 11, including: an input mechanism for receiving a query request including a query term, a facet request and a category set constraint; a results mechanism for obtaining a result set of documents for the query term, including: a category set constraint results component for determining, for each document in the result set, if terms matching the categories from the set constraint occur in the document and, if so, obtaining identifiers of the sets to which each category belongs; a category set data retriever for obtaining the payload of the index entry for category set data to obtain identifiers of the categories in the identified sets; and a count component for counting all categories that match the facet request.
 16. A method of providing a service to a customer over a network, the service comprising: having a document set of multiple documents, each document having associated categories to which it belongs; grouping multiple categories associated with a document into a category set based on a relationship between the multiple categories; associating the category set with the document; and indexing the category set for retrieval of documents from categories sharing a category set. 